/**
 * Candidate number: 35834
 * 
 * Author Nia Radical
 */
package tv.starfu.components.math;

import com.artemis.Component;
import com.jme3.math.FastMath;

public class Lissajous extends Component {
  private int xCoef; 
  private int yCoef; 
  private int zCoef;

  public Lissajous() {
    this.xCoef = 1;
    this.yCoef = 3;
    this.zCoef = 2;
  }

  public Lissajous(int xCoef, int yCoef, int zCoef) {
    this.xCoef = xCoef;
    this.yCoef = yCoef;
    this.zCoef = zCoef;
  }

  public float x(float t) {
    float X = 300 * FastMath.sin(xCoef * t * FastMath.TWO_PI);
    return X;
  }

  public float y(float t) {
    float Y = 160 * FastMath.sin(yCoef * t * FastMath.TWO_PI + FastMath.PI/2);
    return Y;
  }

  public float z(float t) {
    float Z = 300 * FastMath.sin(zCoef * t * FastMath.TWO_PI);
    return Z;
  }
}



